.class public Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;
.super Ljava/lang/Object;
.source "GpsDrawingState.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/states/map_states/MapState;


# instance fields
.field private data:Llt/noframe/gpsfarmguide/Data;


# direct methods
.method public constructor <init>()V
    .locals 7

    .line 24
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 25
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    iput-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    .line 26
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton1()Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f08016e

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 27
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton2()Landroid/view/MenuItem;

    move-result-object v0

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 28
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getButton3()Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 29
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 30
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getLayersButton()Landroid/view/MenuItem;

    move-result-object v0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setVisible(Z)Landroid/view/MenuItem;

    .line 31
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 33
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v2

    const-wide/high16 v3, 0x4049000000000000L    # 50.0

    invoke-static {v3, v4, v2}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v2

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v5

    invoke-static {v3, v4, v5}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v3

    invoke-virtual {v0, v1, v2, v1, v3}, Lcom/google/android/gms/maps/GoogleMap;->setPadding(IIII)V

    .line 34
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    iget-object v2, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getZoomOutButton()Landroid/widget/ImageButton;

    move-result-object v2

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    const-wide v4, 0x405a400000000000L    # 105.0

    invoke-static {v4, v5, v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v3

    const/4 v4, 0x1

    invoke-static {v0, v2, v3, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 35
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    iget-object v2, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getMapStatesController()Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/states/map_states/MapStatesController;->getCenter()Landroid/widget/ImageButton;

    move-result-object v2

    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v3

    const-wide v5, 0x404b800000000000L    # 55.0

    invoke-static {v5, v6, v3}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->dpToPx(DLandroid/content/Context;)I

    move-result v3

    invoke-static {v0, v2, v3, v4}, Llt/noframe/gpsfarmguide/utils/ScreenHelper;->setTopMargins(Landroid/content/Context;Landroid/widget/ImageButton;IZ)V

    .line 38
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    const/4 v2, 0x0

    invoke-virtual {v0, v2}, Lcom/google/android/gms/maps/GoogleMap;->setOnMapClickListener(Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;)V

    .line 39
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/views/ActivityDrawer;->setDrawerLocked(Z)V

    return-void
.end method


# virtual methods
.method public button1()V
    .locals 0

    .line 44
    invoke-static {}, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->endMeasuring()V

    return-void
.end method

.method public button2()V
    .locals 0

    return-void
.end method

.method public button3()V
    .locals 0

    return-void
.end method

.method public buttonCenter()V
    .locals 3

    .line 67
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    invoke-static {v0, v1, v1, v2}, Llt/noframe/gpsfarmguide/LocationTracking;->centerMyPosition(Landroid/content/Context;ZZZ)Z

    return-void
.end method

.method public buttonZoom()V
    .locals 2

    .line 59
    iget-object v0, p0, Llt/noframe/gpsfarmguide/states/map_states/GpsDrawingState;->data:Llt/noframe/gpsfarmguide/Data;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->getPoints()Ljava/util/List;

    move-result-object v0

    .line 60
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_0

    const/4 v1, 0x2

    .line 61
    invoke-static {v0, v1}, Llt/noframe/gpsfarmguide/utils/Camera;->showMeasure(Ljava/util/List;I)V

    .line 62
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/LocationTracking;->setMapNotFollowing(Landroid/content/Context;)V

    return-void
.end method

.method public onBackPressed()V
    .locals 0

    .line 72
    invoke-static {}, Llt/noframe/gpsfarmguide/dialogs/MeasuresDialogs;->endMeasuring()V

    return-void
.end method
